﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Telerik.Web.Mvc;
using ProjectManagement.Models;
using Projectmanagement.Entity;

namespace Projectmanagement.Controllers
{
    public class ProjectTaskProcessController : Controller
    {
        //
        // GET: /ProjectTaskProcess/

        public ActionResult Index()
        {
            return View();
        }

        [GridAction]
        public ActionResult _SelectOverdueTaskIndex(int? conferenceid, string member)
        {

            var task = DQ.GetProjectTaskSchedule(conferenceid, member, true);
            if (Employee.CurrentRoleLVL < ManagerRequired.LVL)
            {
                task = task.Where(w => w.PMName == Employee.CurrentUserName);
            }
            return View(new GridModel(task));
        }

    }
}
